import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
import store from './store'
import { Provider } from 'react-redux'
import reportWebVitals from './reportWebVitals'
import { HashRouter, BrowserRouter } from 'react-router-dom'
import upload from './views/upload'
// 根据环境变量自动切换路由模式
const Router = HashRouter
// process.env.NODE_ENV === 'production' ? BrowserRouter : HashRouter
ReactDOM.render(
	<Provider store={store}>
		<Router>
			<App />
		</Router>
	</Provider>,
	document.getElementById('root')
)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals()
